//
// Created by guoshunw on 23-12-14.
//

#include <gtest/gtest.h>
#include "glog/logging.h"

class GlobalTestEnvironment : public testing::Environment {
    void SetUp() override {// Code here will be called immediately after the environment is
        // initialized (before each test).
        testing::Environment::SetUp();
        google::InitGoogleLogging("capn_test");
    }

    void TearDown() override {// Code here will be called immediately after each test (right before
        testing::Environment::TearDown();
        google::ShutdownGoogleLogging();
    }
};

__attribute__((unused)) auto gl = ::testing::AddGlobalTestEnvironment(new GlobalTestEnvironment);

class CapnTest : public ::testing::Test {

protected:
protected:
    void TearDown() override {
        GTEST_LOG_(INFO) << "TearDown";
    }
    void SetUp() override {
        GTEST_LOG_(INFO) << "SetUp";
        LOG(INFO) << "Hello world.";
    }
};

// https://github.com/capnproto/capnproto/tree/master/c++/samples

TEST_F(CapnTest, Test1) {
    ASSERT_EQ(1, 1);
}
TEST(Hello, HelloTest){
    EXPECT_EQ(1, 1);
}